{{define "title"}}重置密码 {{end}}
{{define "content"}}
<div class="row banner">
</div>
<div class="row">
	<div class="col-lg-9 col-md-8 col-sm-7">
		<ol class="breadcrumb">
			<li><a href="/">首页</a></li>
			<li><a href="/users">会员</a></li>
			<li class="active">重置密码</li>
		</ol>
		<div class="box_white">
			{{if .valid}}
				{{if .success}}{{.success}}{{else}}
			<form class="form-horizontal validate-form" role="form" action="/account/resetpwd" method="POST">
				<input name="code" type="hidden" value="{{.code}}">
				<fieldset>
					<legend>重置密码</legend>
					{{if .error}}
					<div class="alert alert-block alert-error" id="alert_info">
						{{.error}}
					</div>
					{{end}}
					<div class="form-group form-group-sm">
						<label class="col-sm-3 control-label" for="passwd">新密码</label>
						<div class="col-sm-6">
							<input class="form-control {required:true,rangelength:[6,32]}" type="password" id="passwd" name="passwd" placeholder="新密码">
						</div>
					</div>
					<div class="form-group form-group-sm">
						<label class="col-sm-3 control-label" for="pass2">确认密码</label>
						<div class="col-sm-6">
							<input class="form-control {required:true,equalTo:'#passwd'}" type="password" id="pass2" name="pass2" placeholder="确认密码">
						</div>
					</div>
				</fieldset>
				<div class="form-group form-group-sm">
					<div class="col-sm-offset-5 col-sm-6">
						<button type="submit" class="btn btn-default btn-sm submit">重置密码</button>
					</div>
				</div>
			</form>
			{{end}}
    {{else}}
      {{.error}}
    {{end}}
		</div>
	</div>
	<div class="col-lg-3 col-md-4 col-sm-5">
		<div class="row box_white sidebar">
			<div class="top">
				<h3 class="title"><i class="glyphicon glyphicon-list-alt"></i>&nbsp;其他操作</h3>
			</div>
			<div class="sb-content">
				<ul>
					<li><a href="/account/login">登录</a></li>
					<li><a href="/account/register">注册</a></li>
				</ul>
			</div>
		</div>
	</div>
</div>
{{end}}
{{define "css"}}
{{end}}
{{define "js"}}
{{include "cssjs/publish.js.html" .}}
{{if or .error .success}}
<script type="text/javascript">
function countDown(secs, surl){     
    var jumpTo = document.getElementById('jumpTo');
    jumpTo.innerHTML = secs;  
    if(--secs>0){     
        setTimeout("countDown("+secs+",'"+surl+"')",1000);     
    } else {       
        location.href = surl;     
    }
}
countDown(3, $('#jump_url').attr("href"));
</script>
{{end}}
{{end}}